local unitDefs = {

C_MONITOR = {
  name                = "Monitor",
  description         = "Artillery Platform Ship (torpedo resistant)",
  
  objectName          = "c_escortship.s3o",  --"c_monitor.s3o" 
  script              = "c_escortship.lua",  --"c_monitor.lua"
  buildPic            = "c_escortship.png",  --"c_monitor.png"
  iconType            = "ship",  
  category            = [[WATER SHIP WEAPON]],  --LEVEL1 NOTAIR
  TEDClass            = "SHIP", 
  movementClass       = "SHIP6",
  
  -- Cost
  buildCostMetal      = 100,   --1300
  buildCostEnergy     = 0,
  buildTime           = 1000,  --13000,
  power               = 1300,

  -- Damage
  maxDamage           = 6900,
  idleAutoHeal        = 5,
  idleTime            = 900,

  -- Flanking Bonus
  -- flankingBonusMode   = 3,
  -- flankingBonusDir    = [[0 0 1]],
  -- flankingBonusMin    = 0.9,
  -- flankingBonusMax    = 1.1,

  -- Collision Volume
  collisionVolumeType    = "ellipsoid", 
  collisionVolumeTest    = 1,  
  collisionVolumeOffsets = [[0 0 5]],
  collisionVolumeScales  = [[30 35 175]],
  modelCenterOffset      = [[0 0 12.6683]],
  
  -- Movement and Pathfinding
  footprintX          = 6,
  footprintZ          = 6,  
  maxVelocity         = 1.2,
  maxReverseVelocity  = 0.5,
  acceleration        = 0.02,
  brakeRate           = 0.02,
  turnRate            = 90,
  turnInPlace         = true,
  minWaterDepth       = 10, 

  -- Abilities
  canMove             = true,  
  canAttack           = true,
  canGuard            = true,
  canPatrol           = true,
  floater             = true,  
  activateWhenBuilt   = true,

  -- Detection  
  sightDistance       = 690,
  radarDistance       = 0,  --?
  sonarDistance       = 0,  
  seismicSignature    = 0,  

  -- Weapons
  explodeAs           = "UNIT_EXPLOSION_MEDIUM1",  
  selfDestructAs      = "UNIT_SELFD_MEDIUM1", 
  noChaseCategory     = [[SUB PLANE HELICOPTER]],  

  weapons = {
    [1] = { def = "C_CANNON_MONITOR"          , mainDirAngle =   0, maxAngleDif = 290, },
    [2] = { def = "C_MORTAR_HEAVY"            ,                                        rangeCircle = true, },
    [3] = { def = "C_CANNON_DESTROYER_1BARREL", mainDirAngle =  90, maxAngleDif = 200, rangeCircle = true, },
    [4] = { def = "C_CANNON_DESTROYER_1BARREL", mainDirAngle = -90, maxAngleDif = 200, },
    -- [5] = {
      -- def                = "C_CANNON_MONITOR_MINRANGE",
      -- slaveTo            = 1,
    -- },
    -- [6] = {
      -- def                = "C_MORTAR_HEAVY_MINRANGE",
      -- slaveTo            = 2,
    -- },    
  },
  
  sfxtypes = {
    explosiongenerators = {
      "custom:FLARE_CANNON_LIGHT",  --"custom:FLARE_CANNON_HEAVY",
    },
  },

  customParams = {
    wreckModels = { "c_escortship.s3o", "c_escortship.s3o" },  --"c_monitor_wreck1.s3o", "c_monitor_wreck2.s3o"
    heapModels = { "3x3d.3do" },

	  soundCategory = "SHIP1",
  
	  armorThickness = 150,
	
	  lightDamageChance = 0.4,	
	  mediumDamageChance = 0.3,
	  heavyDamageChance = 0.3,
  },
},
}

return lowerkeys(unitDefs)